<h1>Mostrar Periodo <%= @cultural_heritage_period.name %></h1>
<% if flash[:notice] %>
    <div id="notice"><%= flash[:notice] %></div>
<% end %>
<div class="shadow">
<fieldset id="agrupacion" >
<legend>Datos Básicos </legend>
    <% if ! @cultural_heritage_period.name.blank? %>
    <p>
      <b>Nombre:</b>
      <%= @cultural_heritage_period.name %>
    </p>
    <%end%>
    <% if ! @cultural_heritage_period.startdate.blank? %>
    <p>
      <b>Fecha Inicio:</b>
      <%= @cultural_heritage_period.startdate.strftime("%Y").to_s.to_i %>

      <%if @cultural_heritage_period.dcInicio %>
      DC
      <%else%>
      AC
      <%end%>
      
    </p>
    <%end%>
    <% if ! @cultural_heritage_period.enddate.blank? %>
    <p>
      <b>Fecha Fin:</b>
      <%= @cultural_heritage_period.enddate.strftime("%Y").to_s.to_i %>

      <%if @cultural_heritage_period.dcFin %>
      DC
      <%else%>
      AC
      <%end%>
      
    </p>
    <%end%>
</fieldset>


<fieldset id="agrupacion" >
<legend>Culturas por Periodo </legend>
<% if !(@cultural_heritage_period.list_obj_cultures.blank?) %>
<table class="paginated_table sorted_table" >
  <thead>
  <tr>
    <th>Nombre</th>
    <th>Locacion</th>
    <th>Descripcion</th>
  </tr>
</thead>
<tbody>
<% @cultural_heritage_period.list_obj_cultures.each do |cultural_heritage_culture| %>
  <tr>
    <td><%= link_to cultural_heritage_culture.name,{:controller=>"/cultural_heritage/cultures",:action => 'show',:id => cultural_heritage_culture.id},:title => cultural_heritage_culture.description %></td>

    <td><%= cultural_heritage_culture.location %></td>
    <td><%= cultural_heritage_culture.description %></td>
  </tr>
<% end %>
</tbody>
</table>
<% else %>
    <p> Ningún registro encontrado</p>
<% end %>
</fieldset>

</div>
<br/>



<% if (user_signed_in? && ([2].include?(current_user.role))) %>
<%= link_to 'Editar', edit_cultural_heritage_period_path(@cultural_heritage_period) %> |
<%end%>
<%= link_to 'Regresar', cultural_heritage_periods_path %>
